﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<NETMovie.UI.WebMVC.Models.MovieModel>>" %>

 
        
    <table>
        <tr>
            <th class="th_color">List of Movies</th>
        </tr>
        <tr>
        <th class="th_color"></th>
        <th class="th_color">Title</th>
        <th class="th_color">Release Date</th>
        <th class="th_color">Available Date</th>
        <th class="th_color">Preminum</th>
          <th class="th_color">Deleted?</th>
        </tr>
    <%
        
        foreach (var item in Model)
        { %>
    
        <tr>
            <td>
           <%:Html.ActionLink("Update", "EditMovie", new { id = item.MovieId })%>
          |
                <%: Html.ActionLink("Delete", "DeleteMovie", new { id = item.MovieId })%> |
                     
       
               <%: Html.ActionLink("Details", "ViewMovieDetails", new { id = item.MovieId })%> |
            </td>
            <td>
                
                <%: Html.Encode(item.Title)%>
            </td>
            <td><%:Html.Encode(item.ReleaseDate)%></td>
            <td><%:Html.Encode(item.AvailableDate)%></td>
         <td><% if(item.isPremium) { %>Yes <% } else { %> No <% } %></td>
        <td><% if(item.DeleteFlg) { %>Yes <% } else { %> No <% } %></td>
        </tr>
    
  <% }  %>

    </table>

    